
package com.jiuqi.irs.generator.form;

import java.text.ParseException;
import java.text.SimpleDateFormat;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

/**
 * Form for tbDetailproof.
 *
 * @author <a href="http://boss.bekk.no/boss/middlegen/"/>Middlegen</a>
 *
 * @struts.form name="tbDetailproofForm"
 */
public class TbXtxxForm extends ActionForm {

   private final static SimpleDateFormat FORMAT = new SimpleDateFormat("dd.MM.yyyy hh:mm:ss");

   private java.lang.String pzbh = null;
   
   private java.lang.String pzmc = null;

   private java.lang.String pzlxDm = null;

   private java.lang.String bz = null;
   
   private java.lang.String zt1 = null;
   
   private java.lang.String zt2 = null;
   
   private java.lang.String zt3 = null;
   
  
   /**
    * Standard constructor.
    */
   public TbXtxxForm() {
   }

  




public java.lang.String getPzbh() {
	return pzbh;
}






public void setPzbh(java.lang.String pzbh) {
	this.pzbh = pzbh;
}






public java.lang.String getPzmc() {
	return pzmc;
}






public void setPzmc(java.lang.String pzmc) {
	this.pzmc = pzmc;
}






public java.lang.String getPzlxDm() {
	return pzlxDm;
}






public void setPzlxDm(java.lang.String pzlxDm) {
	this.pzlxDm = pzlxDm;
}






public java.lang.String getBz() {
	return bz;
}






public void setBz(java.lang.String bz) {
	this.bz = bz;
}






public java.lang.String getZt1() {
	return zt1;
}






public void setZt1(java.lang.String zt1) {
	this.zt1 = zt1;
}






public java.lang.String getZt2() {
	return zt2;
}






public void setZt2(java.lang.String zt2) {
	this.zt2 = zt2;
}






public java.lang.String getZt3() {
	return zt3;
}






public void setZt3(java.lang.String zt3) {
	this.zt3 = zt3;
}






public static SimpleDateFormat getFormat() {
	return FORMAT;
}






/**
    * Validate the properties that have been set from this HTTP request,
    * and return an <code>ActionErrors</code> object that encapsulates any
    * validation errors that have been found.  If no errors are found, return
    * <code>null</code> or an <code>ActionErrors</code> object with no
    * recorded error messages.
    *
    * @param mapping The mapping used to select this instance
    * @param request The servlet request we are processing
    */
   public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
      ActionErrors errors = new ActionErrors();
      // test for nullity
      if(getPzbh() == null) {
         errors.add("pzbh", new ActionError("error.pzbh.required"));
      }
      if(getPzmc() == null) {
         errors.add("pzmc", new ActionError("error.pzmc.required"));
      }
      if(getPzlxDm() == null) {
          errors.add("pzlxDm", new ActionError("error.pzlxDm.required"));
       }
     
      // TODO test format/data
      return errors;
   }
}
